"use strict";
require([
  'polyfill',
  './dev/layer',
  './dev/nav',
  'text!tpl/detail.hbs'
], function ( polyfill, layer, nav, cont) {

  nav.showNav();

  $.getJSON("./data/text.json", (data) => {
    const i = window.location.href.split("/").length - 1;
    const lastName = window.location.href.split("/")[i].split(".")[0];
    $.each(data, (index, item) => {
      if (item.id === lastName) {
        // console.log(lastName)
        // console.log(item)
        layer.setlayTpl('laytpl', 'culture', cont, item);
        layer.setBanner('carousel', '#bannerCar', '90%', '395px', 'auto');
      }
    });

  });


});

